package com.sd.sl;

public class BankPay extends Pay{
    @Override
    public  void pay(double money) {
        double m = 10;
        if (m < money) {
            System.out.println("你的余额不足");
        } else {
            System.out.println("你消费了" + money);
            m = m - money;
            System.out.println("你的余额为" + m);
        }
    }
    @Override
    public void pay2(double money) {
        double m = 100;
        if (m < money) {
            System.out.println("你的余额不足");
        } else {
            System.out.println("你消费了" + money);
            m = m - money;
            System.out.println("你的余额为" + m);
        }
    }


    @Override
    public void pay3(double money) {
        double m = 80;
        if (m < money) {
            System.out.println("你的余额不足");
        } else {
            System.out.println("你消费了" + money);
            m = m - money;
            System.out.println("你的余额为" + m);
        }
    }
}
